package edu.chl.da.ejb.ctrl;

import edu.chl.da.ejb.core.Airplane;
import edu.chl.da.ejb.core.Airport;
import edu.chl.da.ejb.core.Destination;
import edu.chl.da.ejb.core.Flight;
import edu.chl.da.ejb.core.FlightPK;
import java.text.ParseException;
import java.util.Date;
import java.util.List;
import javax.ejb.Remote;

/**
 *
 * @author Max
 */
@Remote
public interface IManageFlight {
    public void createFlight(String price, Date startDate, String startTime, Date endDate, String endTime, Integer selectedAirplane,
                    Integer selectedToDest, Integer selectedToAirport, Integer selectedFromDest, Integer selectedFromAirport) throws IllegalArgumentException;
    public Flight editFlight(Flight flight);
    public List<Flight> getAllFlightsSortedByStartDate();
    public boolean removeFlight(Flight flight);
    public List<Flight> getFlightsByFromDestination(Destination destination);
    public List<Flight> getAllFlights();
    public Flight getFlight(FlightPK flightPK);

    /** Get all Unique destinations from all flights */
    public List<Destination> getAllUniqueFromDestinations();

    /** Get all unique to destinations from a specific from destination */
    public List<Destination> getAllUniqueToDestinations(Destination from);

    /** Gel all unique from destinations that has a two-node connected route. */
    public List<Destination> getAllFromDestinationRouteFlights() throws ParseException;

}
